import request from '@/utils/request'
const api = {
        apipath: '/system/moduleInfo',
        baseURL: "http://172.16.11.203:8069"
            // baseURL:"http://172.16.21.112:8069"
    }
    // 

export function addModuleType(params) {
    return request({
        url: '/system/module',
        method: 'post',
        data: params,
        headers: { 'Content-Type': 'application/json;charset=UTF-8' }
    })
}

export function addModuleTypeNew(params) {
    return request({
        url: '/system/modulee',
        method: 'post',
        data: params,
        headers: { 'Content-Type': 'application/json;charset=UTF-8' }
    })
}

export function queryModuleTypeNew(params) {
    return request({
        url: '/system/modulee/list',
        method: 'get',
        params,
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    })
}

export function queryModuleType(params) {
    return request({
        url: '/system/module/list',
        method: 'get',
        params,
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    })
}

export function delModuleType(params) {
    return request({
        url: '/system/module',
        method: 'delete',
        params,
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    })
}

export function addModuleInfo(params) {
    return request({
        url: api.apipath + '/save',
        method: 'post',
        data: params,
        headers: { 'Content-Type': 'application/json;charset=UTF-8' }
    })
}

export function queryModuleInfo(params) {
    return request({
        url: api.apipath + '/list',
        method: 'get',
        params,
        headers: { 'Content-Type': 'application/json;charset=UTF-8' }
    })
}

export function queryAllModuleInfo(params) {
    return request({
        url: api.apipath + '/listAll',
        method: 'get',
        params,
        headers: { 'Content-Type': 'application/json;charset=UTF-8' }
    })
}

export function queryAllModuleInfoNew(params) {
    return request({
        url:'/system/moduleInfo/list',
        method: 'get',
        params,
        headers: { 'Content-Type': 'application/json;charset=UTF-8' }
    })
}

export function getModuleName(params) {
    return request({
        url: api.apipath + '/getModuleName',
        method: 'get',
        data: params,
        headers: { 'Content-Type': 'application/json;charset=UTF-8' }
    })
}

export function delModule(params) {
    return request({
        url: api.apipath + '/delete',
        method: 'delete',
        params,
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    })
}


export function getOrgTree(params) {
    return request({
        url: '/system/org/treeselect',
        method: 'get',
        params,
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    })
}
// url: '/system/modulee/moduleCateTree/listt',
export function moduleCateTree(params) {
    return request({
        url: '/system/module/getModuleLeftTree',
        method: 'get',
        params,
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    })
}

